package a.j;

import a.c.d;
import a.c.e;
import a.c.y;

import javax.swing.*;
import javax.swing.event.ChangeEvent;
import javax.swing.event.ChangeListener;
import java.awt.*;
import java.awt.event.MouseEvent;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;

public class uf
  extends gf
{
  private dd m;
  private ChangeListener G = new a_();
  private List H = new ArrayList();
  private boolean I;
  private boolean J;
  private boolean K;
  private boolean L = true;
  public static boolean M;
  
  public boolean v()
  {
    return this.I;
  }
  
  public boolean w()
  {
    return this.L;
  }
  
  public void g(boolean paramBoolean)
  {
    this.L = paramBoolean;
  }
  
  public void h(boolean paramBoolean)
  {
    this.I = paramBoolean;
  }
  
  public boolean x()
  {
    return this.J;
  }
  
  public void i(boolean paramBoolean)
  {
    this.J = paramBoolean;
  }
  
  public boolean y()
  {
    return this.K;
  }
  
  public void j(boolean paramBoolean)
  {
    this.K = paramBoolean;
  }
  
  public void a(ed paramed)
  {
    if (paramed == null) {
      throw new NullPointerException();
    }
    this.H.add(paramed);
  }
  
  public void b(ed paramed)
  {
    this.H.remove(paramed);
  }
  
  public dd z()
  {
    return this.m;
  }
  
  private boolean c(MouseEvent paramMouseEvent)
  {
    boolean bool = ld.E;
    if (!bool) {
      if (this.m == null)
      {
        double d1 = this.i.f(paramMouseEvent.getX());
        double d2 = this.i.g(paramMouseEvent.getY());
        a(a(this.i, d1, d2, null));
      }
    }
    if ((bool) || (this.m != null))
    {
      if (!bool) {
        if (this.m.b())
        {
          if (!bool) {
            if (this.m.a()) {
              this.m.b(d(paramMouseEvent));
            }
          }
          return true;
        }
      }
      if (bool) {
        break label191;
      }
      if (this.m.a())
      {
        ng localng = d(paramMouseEvent);
        if (bool) {
          break label191;
        }
        if (this.m.a(localng))
        {
          if (bool) {
            break label191;
          }
          if (a(this.m))
          {
            this.m.b(localng);
            return true;
          }
        }
      }
    }
    label191:
    return false;
  }
  
  public void A()
  {
    boolean bool = ld.E;
    dd localdd = this.m;
    if ((bool) || (localdd != null)) {
      if (!bool)
      {
        if (localdd.b()) {
          localdd.d();
        }
      }
      else
      {
        localdd.b(this.G);
        a(false);
      }
    }
  }
  
  public boolean a(dd paramdd)
  {
    boolean bool2 = ld.E;
    if (!bool2)
    {
      if (this.m != null)
      {
        if (bool2) {
          break label40;
        }
        if (this.m != paramdd) {
          A();
        }
      }
      this.m = paramdd;
    }
    label40:
    if ((bool2) || (this.m != null))
    {
      boolean bool1 = this.m.b();
      if (!bool2)
      {
        if (!bool1) {
          this.m.c();
        }
        bool1 = this.m.b();
      }
      if (!bool2) {
        if (bool1)
        {
          this.m.a(this.G);
          a(true);
        }
      }
      return bool1;
    }
    return false;
  }
  
  protected void B()
  {
    this.m = null;
    a(false);
    if ((ld.E) || (this.L)) {
      g();
    }
  }
  
  private ng d(MouseEvent paramMouseEvent)
  {
    pg localpg = this.i;
    double d1 = a(paramMouseEvent.getX());
    double d2 = b(paramMouseEvent.getY());
    return new ng(localpg, this, d1, d2, paramMouseEvent);
  }
  
  public void mousePressed(MouseEvent paramMouseEvent)
  {
    C();
    this.s = paramMouseEvent;
    if ((ld.E) || (!c(paramMouseEvent))) {
      super.mousePressed(paramMouseEvent);
    }
  }
  
  protected void C()
  {
    boolean bool = ld.E;
    if (e())
    {
      Component localComponent = KeyboardFocusManager.getCurrentKeyboardFocusManager().getFocusOwner();
      if (((bool) || (localComponent != null)) && ((bool) || (!SwingUtilities.isDescendingFrom(localComponent, this.i)))) {
        this.i.B().requestFocusInWindow();
      }
    }
  }
  
  public void mouseReleased(MouseEvent paramMouseEvent)
  {
    this.v = paramMouseEvent;
    if ((ld.E) || (!c(paramMouseEvent))) {
      super.mouseReleased(paramMouseEvent);
    }
  }
  
  public void mouseClicked(MouseEvent paramMouseEvent)
  {
    this.w = paramMouseEvent;
    if ((ld.E) || (!c(paramMouseEvent))) {
      super.mouseClicked(paramMouseEvent);
    }
  }
  
  public void mouseDragged(MouseEvent paramMouseEvent)
  {
    this.t = paramMouseEvent;
    if ((ld.E) || (!c(paramMouseEvent))) {
      super.mouseDragged(paramMouseEvent);
    }
  }
  
  public void mouseMoved(MouseEvent paramMouseEvent)
  {
    this.u = paramMouseEvent;
    if ((ld.E) || (!c(paramMouseEvent))) {
      super.mouseMoved(paramMouseEvent);
    }
  }
  
  public void mouseEntered(MouseEvent paramMouseEvent)
  {
    if ((ld.E) || (!c(paramMouseEvent))) {
      super.mouseEntered(paramMouseEvent);
    }
  }
  
  public void mouseExited(MouseEvent paramMouseEvent)
  {
    if ((ld.E) || (!c(paramMouseEvent))) {
      super.mouseExited(paramMouseEvent);
    }
  }
  
  public dd a(pg parampg, double paramDouble1, double paramDouble2, sc paramsc)
  {
    boolean bool2 = ld.E;
    boolean bool1 = ld.D;
    if ((bool2) || (paramsc == null)) {
      paramsc = a(paramDouble1, paramDouble2);
    }
    int i = 0;
    if (i < this.H.size()) {}
    Object localObject2;
    Object localObject3;
    while (bool2)
    {
      localObject2 = (ed)this.H.get(i);
      localObject3 = ((ed)localObject2).a(parampg, paramDouble1, paramDouble2, paramsc);
      if (bool1) {
        break label536;
      }
      if ((bool2) || (localObject3 != null)) {
        return localObject3;
      }
      i++;
      if (!bool1) {
        break;
      }
    }
    if (paramsc != null)
    {
      Object localObject1;
      dd localdd;
      if (!bool2) {
        if (this.J)
        {
          localObject1 = paramsc.m();
          if (localObject1 != null)
          {
            localObject2 = parampg.a().w((e)localObject1);
            localObject3 = ((ld)localObject2).M();
            if ((bool2) || (localObject3 != null))
            {
              localdd = ((ed)localObject3).a(parampg, paramDouble1, paramDouble2, paramsc);
              if ((bool2) || (localdd != null)) {
                return localdd;
              }
            }
          }
        }
      }
      if (!bool2) {
        if (this.K)
        {
          localObject1 = paramsc.o();
          if (localObject1 != null)
          {
            localObject2 = parampg.a().t((d)localObject1);
            localObject3 = ((tb)localObject2).T();
            if ((bool2) || (localObject3 != null))
            {
              localdd = ((ed)localObject3).a(parampg, paramDouble1, paramDouble2, paramsc);
              if ((bool2) || (localdd != null)) {
                return localdd;
              }
            }
          }
        }
      }
      if (this.I)
      {
        localObject1 = parampg.a().db();
        if (((y)localObject1).e()) {}
        label372:
        while (bool2)
        {
          localObject2 = (qb)((y)localObject1).j();
          if ((!bool2) && (bool1)) {
            break label536;
          }
          if (!bool2)
          {
            if ((localObject2 instanceof ed))
            {
              localObject3 = ((ed)localObject2).a(parampg, paramDouble1, paramDouble2, paramsc);
              if (bool2) {
                break label372;
              }
              if (localObject3 != null) {
                return localObject3;
              }
            }
            ((y)localObject1).f();
          }
          if (!bool1) {
            break;
          }
        }
        localObject1 = parampg.U().iterator();
        while (((Iterator)localObject1).hasNext())
        {
          localObject2 = (qb)((Iterator)localObject1).next();
          if ((localObject2 instanceof ed))
          {
            localObject3 = ((ed)localObject2).a(parampg, paramDouble1, paramDouble2, paramsc);
            if (bool2) {
              break label497;
            }
            if ((bool2) || (bool1)) {
              break label492;
            }
            if (localObject3 != null) {
              return localObject3;
            }
          }
        }
        localObject1 = parampg.V().iterator();
        while (((Iterator)localObject1).hasNext())
        {
          label492:
          localObject2 = (qb)((Iterator)localObject1).next();
          label497:
          if ((localObject2 instanceof ed))
          {
            localObject3 = ((ed)localObject2).a(parampg, paramDouble1, paramDouble2, paramsc);
            if ((bool2) || (localObject3 != null)) {
              return localObject3;
            }
          }
        }
      }
    }
    label536:
    return null;
  }
  
  final class a_
    implements ChangeListener
  {
    a_() {}
    
    public void stateChanged(ChangeEvent paramChangeEvent)
    {
      boolean bool = ld.E;
      dd localdd = (dd)paramChangeEvent.getSource();
      if (!bool)
      {
        if (!localdd.b()) {
          localdd.b(this);
        }
      }
      else if (((!bool) && ((localdd == uf.this.m) && (bool))) || (!uf.this.m.b())) {
        uf.this.B();
      }
    }
  }
}



/* Location:           E:\idea\

 * Qualified Name:     a.j.uf

 * JD-Core Version:    0.7.0.1

 */